package org.cbg.panel;

import java.awt.Dimension;
import java.io.File;
import java.io.IOException;

import javax.swing.JPanel;

import org.cbg.btn.TrslationMainBtn;
import org.cbg.frame.TrslationMainJframe;
import org.come.until.CutButtonImage;

 

/**
 * 我要买面板
 * 
 * @author Administrator
 * 
 */
public class TraslationWantBuyJpanel extends JPanel {

    /**
     * 首页，大话币，道具，召唤兽，装备，灵宝，公示期，收藏
     */
    private TrslationMainBtn shouye, dahuabi, daoju, zhaohuansou, zhuangbei, lingbao, gongshiqi, shoucang;

    /**
     * 卡片布局
     */
    private TraslationWantBuyCardJapel traslationWantBuyCardJapel;

    public TraslationWantBuyJpanel() {
        this.setPreferredSize(new Dimension(755, 495));
        this.setLayout(null);
        this.setOpaque(false);


        traslationWantBuyCardJapel = new TraslationWantBuyCardJapel();
        this.add(traslationWantBuyCardJapel);
        shouye = new TrslationMainBtn("inkImg/number/b4/B01.png", 1, 5, this);
        dahuabi = new TrslationMainBtn("inkImg/number/b4/B02a.png", 1, 6, this);
        daoju = new TrslationMainBtn("inkImg/number/b4/B03a.png", 1, 7, this);
        zhaohuansou = new TrslationMainBtn("inkImg/number/b4/B04a.png", 1, 8, this);
        zhuangbei = new TrslationMainBtn("inkImg/number/b4/B05a.png", 1, 9, this);
        lingbao = new TrslationMainBtn("inkImg/number/b4/B06a.png", 1, 10, this);
        gongshiqi = new TrslationMainBtn("inkImg/number/b4/B07a.png", 1, 11, this);
        shoucang = new TrslationMainBtn("inkImg/number/b4/B08a.png", 1, 12, this);

        shouye.setBounds(0, 2, 64, 31);
        dahuabi.setBounds(0 + 65, 2, 83, 31);
        daoju.setBounds(19 + 65 * 2, 2, 64, 31);
        zhaohuansou.setBounds(19 + 65 * 3, 2, 83, 31);
        zhuangbei.setBounds(19*2 + 65 * 4, 2, 64, 31);
        lingbao.setBounds(19*2 + 65 * 5, 2, 64, 31);
        gongshiqi.setBounds(19*2 + 65 * 6, 2, 83, 31);
        shoucang.setBounds(19*3 + 65 * 7, 2, 64, 31);

        this.add(shouye);
        this.add(dahuabi);
        this.add(daoju);
        this.add(zhaohuansou);
        this.add(zhuangbei);
        this.add(lingbao);
        this.add(gongshiqi);
        this.add(shoucang);

    }

    public void changeOrder() {
        TraslationWantBuyCardJapel traslationWantBuyCardJapel = TrslationMainJframe.getTrslationMainJframe().getTrslationMainJpanel().getTranslationMainCardJpanel().getTraslationWantBuyJpanel().getTraslationWantBuyCardJapel();
        traslationWantBuyCardJapel.getTraslationWantBuyDaojuJpanel().setShowOrder(0);
        traslationWantBuyCardJapel.getTraslationWantBuyDahuabiJpanel().setShowOrder(0);
        traslationWantBuyCardJapel.getTraslationWantBuyZhaohuanshouJpanel().setShowOrder(0);
        traslationWantBuyCardJapel.getTraslationWantBuyZhaungbeiJpanel().setShowOrder(0);
        traslationWantBuyCardJapel.getTraslationWantBuyLingbaoJpanel().setShowOrder(0);
        traslationWantBuyCardJapel.getTraslationWantBuyGongshiqiJpanel().setShowOrder(0);

        traslationWantBuyCardJapel.getTraslationWantBuyDaojuJpanel().getUpSort()
                .setIcon(CutButtonImage.getImage("inkImg/old/1/Z1002.png", 10, 18));
        traslationWantBuyCardJapel.getTraslationWantBuyDaojuJpanel().getDownSort()
                .setIcon(CutButtonImage.getImage("inkImg/old/1/Z1004.png", 10, 18));
        traslationWantBuyCardJapel.getTraslationWantBuyDahuabiJpanel().getUpSort()
                .setIcon(CutButtonImage.getImage("inkImg/old/1/Z1002.png", 10, 18));
        traslationWantBuyCardJapel.getTraslationWantBuyDahuabiJpanel().getDownSort()
                .setIcon(CutButtonImage.getImage("inkImg/old/1/Z1004.png", 10, 18));
        traslationWantBuyCardJapel.getTraslationWantBuyZhaohuanshouJpanel().getUpSort()
                .setIcon(CutButtonImage.getImage("inkImg/old/1/Z1002.png", 10, 18));
        traslationWantBuyCardJapel.getTraslationWantBuyZhaohuanshouJpanel().getDownSort()
                .setIcon(CutButtonImage.getImage("inkImg/old/1/Z1004.png", 10, 18));
        traslationWantBuyCardJapel.getTraslationWantBuyZhaungbeiJpanel().getSortUp()
                .setIcon(CutButtonImage.getImage("inkImg/old/1/Z1002.png", 10, 18));
        traslationWantBuyCardJapel.getTraslationWantBuyZhaungbeiJpanel().getSortDown()
                .setIcon(CutButtonImage.getImage("inkImg/old/1/Z1004.png", 10, 18));
        traslationWantBuyCardJapel.getTraslationWantBuyLingbaoJpanel().getUpSort()
                .setIcon(CutButtonImage.getImage("inkImg/old/1/Z1002.png", 10, 18));
        traslationWantBuyCardJapel.getTraslationWantBuyLingbaoJpanel().getDownSort()
                .setIcon(CutButtonImage.getImage("inkImg/old/1/Z1004.png", 10, 18));
        traslationWantBuyCardJapel.getTraslationWantBuyGongshiqiJpanel().getUpSort()
                .setIcon(CutButtonImage.getImage("inkImg/old/1/Z1002.png", 10, 18));
        traslationWantBuyCardJapel.getTraslationWantBuyGongshiqiJpanel().getDownSort()
                .setIcon(CutButtonImage.getImage("inkImg/old/1/Z1004.png", 10, 18));

    }

    public TrslationMainBtn getShouye() {
        return shouye;
    }

    public void setShouye(TrslationMainBtn shouye) {
        this.shouye = shouye;
    }

    public TrslationMainBtn getDahuabi() {
        return dahuabi;
    }

    public void setDahuabi(TrslationMainBtn dahuabi) {
        this.dahuabi = dahuabi;
    }

    public TrslationMainBtn getDaoju() {
        return daoju;
    }

    public void setDaoju(TrslationMainBtn daoju) {
        this.daoju = daoju;
    }

    public TrslationMainBtn getZhaohuansou() {
        return zhaohuansou;
    }

    public void setZhaohuansou(TrslationMainBtn zhaohuansou) {
        this.zhaohuansou = zhaohuansou;
    }

    public TrslationMainBtn getZhuangbei() {
        return zhuangbei;
    }

    public void setZhuangbei(TrslationMainBtn zhuangbei) {
        this.zhuangbei = zhuangbei;
    }

    public TrslationMainBtn getLingbao() {
        return lingbao;
    }

    public void setLingbao(TrslationMainBtn lingbao) {
        this.lingbao = lingbao;
    }

    public TrslationMainBtn getGongshiqi() {
        return gongshiqi;
    }

    public void setGongshiqi(TrslationMainBtn gongshiqi) {
        this.gongshiqi = gongshiqi;
    }

    public TrslationMainBtn getShoucang() {
        return shoucang;
    }

    public void setShoucang(TrslationMainBtn shoucang) {
        this.shoucang = shoucang;
    }

    public TraslationWantBuyCardJapel getTraslationWantBuyCardJapel() {
        return traslationWantBuyCardJapel;
    }

    public void setTraslationWantBuyCardJapel(TraslationWantBuyCardJapel traslationWantBuyCardJapel) {
        this.traslationWantBuyCardJapel = traslationWantBuyCardJapel;
    }
}
